<?php
// +----------------------------------------------------------------------
// | saiadmin [ saiadmin快速开发框架 ]
// +----------------------------------------------------------------------
// | Author: your name
// +----------------------------------------------------------------------
namespace app\signup\validate;

use think\Validate;

/**
 * 报名列表验证器
 */
class signupValidate extends Validate
{
    /**
     * 定义验证规则
     */
    protected $rule =   [
        'activity_id' => 'require',
        'member_name' => 'require',
        'sex' => 'require',
        'phone_number' => 'require',
        'company_name' => 'require',
    ];

    /**
     * 定义错误信息
     */
    protected $message  =   [
        'activity_id' => '所属活动必须填写',
        'member_name' => '会员姓名必须填写',
        'sex' => '性别必须填写',
        'phone_number' => '手机号码必须填写',
        'company_name' => '公司名称必须填写',
    ];

    /**
     * 定义场景
     */
    protected $scene = [
        'save' => [
            'activity_id',
            'member_name',
            'sex',
            'phone_number',
            'company_name',
        ],
        'update' => [
            'activity_id',
            'member_name',
            'sex',
            'phone_number',
            'company_name',
        ],
    ];

}
